package com.right.mapper;

import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;

/**
 * Created by ding on 2019/1/15.
 */
public interface UnlockMapper {

    Map<String,Object> selectBicycleByLockNo(@Param("lockNo") String lockNo);

    int selectCountBicycleChargerule(@Param("operatorId") String operatorId);

    BigDecimal selectBicycleChargerule(@Param("operatorId") String operatorId);

    int selectCountA03bankcardByBankCardNo( @Param("bankCardNo") String bankCardNo);

    int insertBicycleCreditCardRecords(@Param("bankCardNo") String bankCardNo,
                                       @Param("createdAt") Date createdAt,
                                       @Param("types") Integer types,@Param("status") Integer status);

    Map<String,Object> selectA03bankcardByBankCardNo(@Param("bankCardNo") String bankCardNo);

    int selectCountBicycleRentByRiderId(@Param("riderId") String riderId);

    Map<String,Object> selectBicycleRentByRiderId(@Param("riderId") String riderId);

    int selectCountBicycleTemporaryStopId(@Param("bicycleId") Long bicycleId,@Param("rentId") Long rentId,@Param("riderId") String riderId);

    Long selectBicycleTemporaryStopId(@Param("bicycleId") Long bicycleId,@Param("rentId") Long rentId,@Param("riderId") String riderId);

    int updateBicycle(@Param("updatedAt") Date updatedAt,@Param("bicycleId") Long bicycleId);

    int updateBicycleTemporaryStop(@Param("status") Integer status,@Param("endTime") Date endTime,@Param("bicycleTemporaryStopId") Long bicycleTemporaryStopId);

    int selectCountUniversalCardByNowCardNo(@Param("cardNo") String cardNo);

    Map<String,Object> selectUniversalCardByNowCardNo(@Param("cardNo")String cardNo);

    int selectCountA15riderForegift(@Param("riderId") String riderId);

    BigDecimal selectA15riderForegift(@Param("riderId")String riderId);

    Integer selectBicycleDocksiteType(@Param("dockSiteNo") String dockSiteNo);

    int insertBicycleRent(@Param("riderId") String riderId,
                          @Param("bicycleNo") String bicycleNo,
                          @Param("beginTime") Date beginTime,
                          @Param("flowStatus") Integer flowStatus,
                          @Param("updatedAt") Date updatedAt,
                          @Param("dockSiteNo") String dockSiteNo,
                          @Param("universalCardId") String universalCardId,
                          @Param("operatorId") Long operatorId,
                          @Param("price") BigDecimal price,
                          @Param("fastFlag") Integer fastFlag,
                          @Param("scanType") Integer scanType,
                          @Param("siteIdRent") Long siteIdRent);

    int updateBicycleDockSite(@Param("updatedAt") Date updatedAt, @Param("dockSiteNo") String dockSiteNo);

    int updateBicycleDockSiteTwo(@Param("updatedAt") Date updatedAt, @Param("dockSiteNo") String dockSiteNo);

    int updateBicycleStatusAndDockSiteNo(@Param("lockNo") String lockNo,@Param("operatorId") String operatorId);

    Integer selectUniversalCardTypeByRiderId(@Param("riderId")String riderId);

    int selectCountA02account(@Param("riderId") String riderId);

    BigDecimal selectA02account(@Param("riderId") String riderId);
}
